package com.sfh.service.model;

import java.util.Date;
import java.util.List;

import com.sfh.service.model.table.NoteTable;

public class NoteModel extends BaseModel<NoteModel> {

	private static final long serialVersionUID = 1L;

	public static final NoteModel NOTE = new NoteModel().dao();

	@Override
	public NoteModel findById(Object idValue) {
		return super.findFirst("select * from " + NoteTable.Table + " where " + NoteTable.id + "=?", idValue);
	}

	public long getId() {
		return this.get(NoteTable.id.toString());
	}

	public void setId(long id) {
		this.set(NoteTable.id.toString(), id);
	}

	public long getUserId() {
		return this.get(NoteTable.userId.toString());
	}

	public void setUserId(long id) {
		this.set(NoteTable.userId.toString(), id);
	}

	public long getMassId() {
		return this.get(NoteTable.massId.toString());
	}

	public void setMassId(long massId) {
		this.set(NoteTable.massId.toString(), massId);
	}

	public String getContent() {
		return this.get(NoteTable.content.toString());
	}

	public void setContent(String content) {
		this.set(NoteTable.content.toString(), content);
	}

	public String getLable() {
		return this.get(NoteTable.lable.toString());
	}

	public void setLable(String lable) {
		this.set(NoteTable.lable.toString(), lable);
	}

	public long getReadiSize() {
		return this.getLong(NoteTable.readiSize.toString());
	}

	public void setReadiSize(long size) {
		this.set(NoteTable.readiSize.toString(), size);
	}
	public long getWealth() {
		return this.getLong(NoteTable.wealth.toString());
	}

	public void setWealth(long size) {
		this.set(NoteTable.wealth.toString(), size);
	}

	public long getMsgSize() {
		return this.getLong(NoteTable.msgSize.toString());
	}

	public void setMsgSize(long size) {
		this.set(NoteTable.msgSize.toString(), size);
	}

	public long getFabulousSize() {
		return this.getLong(NoteTable.fabulousSize.toString());
	}

	public void setFabulousSize(long size) {
		this.set(NoteTable.fabulousSize.toString(), size);
	}

	public Date getTime() {
		return this.get(NoteTable.time.toString());
	}

	public void setTime(Date date) {
		this.set(NoteTable.time.toString(), date);
	}

	public long getVersion() {
		return this.getLong(NoteTable.version.toString());
	}

	public void setVersion(long version) {
		this.set(NoteTable.version.toString(), version);
	}

	public int getVip() {
		return this.get(NoteTable.vip.toString());
	}

	public void setVip(int version) {
		this.set(NoteTable.vip.toString(), version);
	}

	/***
	 * 获取图片集合
	 * 
	 * @return
	 */
	public List<String> getExtImages() {
		return FileResModel.FILE.listFileByRelationId(this.getId());
	}

	/**
	 * 获取创建人
	 * 
	 * @return
	 */
	public UserModel getExtUser() {
		return UserModel.USER.findById( this.getUserId());
	}

	

}
